package com.example.train.eurekaprovide.api;

import com.example.train.eurekaprovide.service.JobService;
import com.example.train.eurekaprovide.entity.Job;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class JobController {

    @Autowired
    JobService jobService;

    @GetMapping("/job/{id}")
    public Job getJob(@PathVariable("id") String id) {
        return jobService.selectById(id);
    }

}
